<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('选择')" />
	<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-type-add">
		<input id="filterstr" name="filterstr" value="33333" type="hidden"  />
		<div class="form-group">
			<div class="col-sm-8">
				<div class="input-group" th:each="item : ${filter}">
					<input  type="checkbox" th:name="${item.name}" th:value="${item.id}" th:checked="${item.check}" /> <i></i><span th:text="${item.name}" th:remove="tag"></span></label>

				</div>
			</div>
		</div>
	</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
	var prefix = ctx + "system/type"
	$("#form-type-add").validate({
		focusCleanup: true
	});

	function submitHandler(index, layero) {
		if ($.validate.form()) {
			var checkedItems = $('input[type="checkbox"]:checked');
			var arr=[];
			checkedItems.each(function() {
				arr.push($(this).val());
			});
			$("#filterstr").val(arr.join(","));
			alert(arr.join(",")+"22222");
			var body = $.modal.getChildFrame(index);
			$("#treeId").val(body.find('#treeId').val());
			$("#treeName").val(body.find('#treeName').val());
			$.modal.close(index);

		}
	}

</script>
</body>
</html>